<template>
  <div>
    <address-edit
      :area-list="areaList"
      show-postal
      show-delete
      show-set-default
      show-search-result
      :search-result="searchResult"
      :area-columns-placeholder="['请选择', '请选择', '请选择']"
      @save="onSave"
      @delete="onDelete"
      @change-detail="onChangeDetail"
    />
  </div>
</template>
<script setup>
import { ref, computed, watch } from 'vue'
import { onBeforeRouteUpdate, useRoute, useRouter } from 'vue-router'
import {
  Toast,
  Stepper,
  ShareSheet,
  AddressList,
  AddressEdit,
  SubmitBar,
  Card,
  List,
  Search
} from 'vant'
import { loadProductsAPI } from '../../services/products'
import { dalImg } from '../../utils/tools'
import router from '../../router'
import { get } from 'vant/lib/utils'
const { replace } = useRouter()
const router1 = useRouter()
const route = useRoute()
const tid = ref(route.query.tid) // 分类id
const list = [
  {
    id: '1',
    name: '张三',
    tel: '13000000000',
    address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
    isDefault: true
  },
  {
    id: '2',
    name: '李四',
    tel: '1310000000',
    address: '浙江省杭州市拱墅区莫干山路 50 号'
  }
]
const disabledList = [
  {
    id: '3',
    name: '王五',
    tel: '1320000000',
    address: '浙江省杭州市滨江区江南大道 15 号'
  }
]

const onAdd = () => Toast('新增地址')
const onEdit = (item, index) => Toast('编辑地址:' + index)

//提交订单

const onSubmit = () => Toast('点击按钮')
</script>
<style scoped>
.top1 {
  z-index: 999;
  position: relative;
  height: 40px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search1 {
  flex: 1;
  position: relative;
}
.search1 input {
  padding: 0 10px;
  height: 30px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(21, 19, 19, 0.475);
  border: none;
}
.ss {
  font-size: 20px;
  position: absolute;
  top: 5px;
  left: calc(50% - 20px);
}
.position {
  width: 8rem;
  color: blue;
}

.more1 {
  font-size: 25px;
  width: 5rem;
}
/* topbar */
.navbar {
  margin-top: 10px;
  display: flex;
}
.navbar li {
  text-align: center;
  flex: 1;
}
</style>
